package model

import (
	"time"
)

type OrderItemsModel struct {
	Id           int64     `json:"id" xorm:"pk autoincr comment('auto_increment') BIGINT(20)"`
	OrderId      int64     `json:"order_id" xorm:"not null default 0 comment('订单ID') BIGINT(20)"`
	ProductId    int64     `json:"product_id" xorm:"not null default 0 comment('商品ID') BIGINT(20)"`
	ProductCount int       `json:"product_count" xorm:"not null default 0 comment('下单数量') INT(10)"`
	Price        float64   `json:"price" xorm:"not null default 0.00 comment('单价') DECIMAL(13,2)"`
	CreateTime   time.Time `json:"create_time" xorm:"not null default '1980-01-01 00:00:00' comment('创建时间') TIMESTAMP"`
}

func (*OrderItemsModel) TableName() string {
	return "order_items"
}
